package com.zzxx.utils;

import com.zzxx.exceptions.StatusCodeException;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class CRMExceptionResolver implements HandlerExceptionResolver {
	@Override
	public ModelAndView resolveException(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) {
		if (e instanceof StatusCodeException){
			System.out.println("出现异常-----------------------");
			e.printStackTrace();
		}
		return null;
	}
}
